package interfazGrafica;

import java.awt.Dimension;

import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.JSeparator;
import java.awt.Color;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.SwingConstants;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.SystemColor;
import javax.swing.JTextArea;
import javax.swing.JComboBox;
import javax.swing.JSpinner;
import javax.swing.JRadioButton;

public class StockAdm extends JPanel{
	private JTable tablaStockActual;
	private JTextField textFieldImporteBaja;
	private JTextField textFieldImporteAlta;
	
	public StockAdm ()	{
		
		try{UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");}
		catch(Exception e) {}
		
		setPreferredSize(new Dimension(1024, 768));
		setSize(new Dimension(1024, 768));
		setMinimumSize(new Dimension(1024, 768));
		setLayout(null);
		
		JSeparator separator = new JSeparator();
		separator.setForeground(Color.LIGHT_GRAY);
		separator.setBounds(26, 44, 75, 1);
		add(separator);
		
		JLabel lblStockActual = new JLabel("Stock Actual");
		lblStockActual.setHorizontalAlignment(SwingConstants.CENTER);
		lblStockActual.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblStockActual.setBounds(97, 35, 108, 21);
		add(lblStockActual);
		
		JSeparator separator_1 = new JSeparator();
		separator_1.setOrientation(SwingConstants.VERTICAL);
		separator_1.setForeground(Color.LIGHT_GRAY);
		separator_1.setBounds(26, 44, 1, 700);
		add(separator_1);
		
		JSeparator separator_2 = new JSeparator();
		separator_2.setForeground(Color.LIGHT_GRAY);
		separator_2.setBounds(199, 44, 313, 1);
		add(separator_2);
		
		JSeparator separator_3 = new JSeparator();
		separator_3.setOrientation(SwingConstants.VERTICAL);
		separator_3.setForeground(Color.LIGHT_GRAY);
		separator_3.setBounds(512, 44, 1, 700);
		add(separator_3);
		
		JSeparator separator_4 = new JSeparator();
		separator_4.setForeground(Color.LIGHT_GRAY);
		separator_4.setBounds(26, 743, 486, 1);
		add(separator_4);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(44, 62, 450, 663);
		add(scrollPane);
		
		tablaStockActual = new JTable();
		scrollPane.setViewportView(tablaStockActual);
		tablaStockActual.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
				{null, null, null, null},
			},
			new String[] {
				"Detalle", "Precio", "En Venta", "Dep\u00F3sito"
			}
		));
		
		JLabel lblProducto = new JLabel("Producto:");
		lblProducto.setVerticalAlignment(SwingConstants.TOP);
		lblProducto.setHorizontalAlignment(SwingConstants.LEFT);
		lblProducto.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblProducto.setBounds(583, 451, 108, 26);
		add(lblProducto);
		
		JLabel lblCantidad = new JLabel("Cantidad:");
		lblCantidad.setVerticalAlignment(SwingConstants.TOP);
		lblCantidad.setHorizontalAlignment(SwingConstants.LEFT);
		lblCantidad.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblCantidad.setBounds(583, 483, 108, 26);
		add(lblCantidad);
		
		JLabel lblImporte = new JLabel("Importe:");
		lblImporte.setVerticalAlignment(SwingConstants.TOP);
		lblImporte.setHorizontalAlignment(SwingConstants.LEFT);
		lblImporte.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblImporte.setBounds(583, 515, 108, 26);
		add(lblImporte);
		
		textFieldImporteBaja = new JTextField();
		textFieldImporteBaja.setText("$22.00");
		textFieldImporteBaja.setHorizontalAlignment(SwingConstants.CENTER);
		textFieldImporteBaja.setFont(new Font("Tahoma", Font.PLAIN, 12));
		textFieldImporteBaja.setEditable(false);
		textFieldImporteBaja.setColumns(10);
		textFieldImporteBaja.setBounds(647, 510, 107, 26);
		add(textFieldImporteBaja);
		
		JButton botonEditarImporteBaja = new JButton("Editar");
		botonEditarImporteBaja.setForeground(Color.BLACK);
		botonEditarImporteBaja.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonEditarImporteBaja.setBorder(UIManager.getBorder("Button.border"));
		botonEditarImporteBaja.setBackground(SystemColor.activeCaptionBorder);
		botonEditarImporteBaja.setBounds(782, 509, 72, 26);
		add(botonEditarImporteBaja);
		
		JButton botonCancelarBaja = new JButton("Cancelar");
		botonCancelarBaja.setForeground(Color.BLACK);
		botonCancelarBaja.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonCancelarBaja.setBorder(UIManager.getBorder("Button.border"));
		botonCancelarBaja.setBackground(SystemColor.activeCaptionBorder);
		botonCancelarBaja.setBounds(896, 699, 84, 26);
		add(botonCancelarBaja);
		
		JSeparator separator_5 = new JSeparator();
		separator_5.setOrientation(SwingConstants.VERTICAL);
		separator_5.setForeground(Color.LIGHT_GRAY);
		separator_5.setBounds(998, 424, 1, 319);
		add(separator_5);
		
		JButton botonAceptarBaja = new JButton("Aceptar");
		botonAceptarBaja.setForeground(Color.BLACK);
		botonAceptarBaja.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonAceptarBaja.setBorder(UIManager.getBorder("Button.border"));
		botonAceptarBaja.setBackground(SystemColor.activeCaptionBorder);
		botonAceptarBaja.setBounds(794, 699, 84, 26);
		add(botonAceptarBaja);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setBounds(583, 579, 397, 102);
		add(scrollPane_1);
		
		JTextArea textAreaBaja = new JTextArea();
		scrollPane_1.setViewportView(textAreaBaja);
		
		JLabel lblObservacionesCaracteres = new JLabel("Observaciones (200 caracteres m\u00E1ximo):");
		lblObservacionesCaracteres.setVerticalAlignment(SwingConstants.TOP);
		lblObservacionesCaracteres.setHorizontalAlignment(SwingConstants.LEFT);
		lblObservacionesCaracteres.setFont(new Font("Tahoma", Font.PLAIN, 12));
		lblObservacionesCaracteres.setBounds(583, 552, 250, 26);
		add(lblObservacionesCaracteres);
		
		JComboBox comboBoxProductoBaja = new JComboBox();
		comboBoxProductoBaja.setBounds(647, 446, 219, 26);
		add(comboBoxProductoBaja);
		
		JSpinner spinnerCantidadBaja = new JSpinner();
		spinnerCantidadBaja.setBounds(647, 478, 107, 26);
		add(spinnerCantidadBaja);
		
		JSeparator separator_6 = new JSeparator();
		separator_6.setOrientation(SwingConstants.VERTICAL);
		separator_6.setForeground(Color.LIGHT_GRAY);
		separator_6.setBounds(565, 424, 1, 319);
		add(separator_6);
		
		JSeparator separator_7 = new JSeparator();
		separator_7.setForeground(Color.LIGHT_GRAY);
		separator_7.setBounds(565, 743, 433, 1);
		add(separator_7);
		
		JLabel lblGestionStock = new JLabel("Dar de Baja Stock");
		lblGestionStock.setHorizontalAlignment(SwingConstants.CENTER);
		lblGestionStock.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblGestionStock.setBounds(607, 414, 154, 21);
		add(lblGestionStock);
		
		JSeparator separator_8 = new JSeparator();
		separator_8.setForeground(Color.LIGHT_GRAY);
		separator_8.setBounds(565, 424, 40, 1);
		add(separator_8);
		
		JSeparator separator_9 = new JSeparator();
		separator_9.setForeground(Color.LIGHT_GRAY);
		separator_9.setBounds(765, 424, 233, 1);
		add(separator_9);
		
		JLabel label = new JLabel("Producto:");
		label.setVerticalAlignment(SwingConstants.TOP);
		label.setHorizontalAlignment(SwingConstants.LEFT);
		label.setFont(new Font("Tahoma", Font.PLAIN, 12));
		label.setBounds(583, 72, 108, 26);
		add(label);
		
		JLabel label_1 = new JLabel("Cantidad:");
		label_1.setVerticalAlignment(SwingConstants.TOP);
		label_1.setHorizontalAlignment(SwingConstants.LEFT);
		label_1.setFont(new Font("Tahoma", Font.PLAIN, 12));
		label_1.setBounds(583, 104, 108, 26);
		add(label_1);
		
		JLabel label_2 = new JLabel("Importe:");
		label_2.setVerticalAlignment(SwingConstants.TOP);
		label_2.setHorizontalAlignment(SwingConstants.LEFT);
		label_2.setFont(new Font("Tahoma", Font.PLAIN, 12));
		label_2.setBounds(583, 136, 108, 26);
		add(label_2);
		
		textFieldImporteAlta = new JTextField();
		textFieldImporteAlta.setText("$22.00");
		textFieldImporteAlta.setHorizontalAlignment(SwingConstants.CENTER);
		textFieldImporteAlta.setFont(new Font("Tahoma", Font.PLAIN, 12));
		textFieldImporteAlta.setEditable(false);
		textFieldImporteAlta.setColumns(10);
		textFieldImporteAlta.setBounds(647, 131, 107, 26);
		add(textFieldImporteAlta);
		
		JButton botonCancelarAlta = new JButton("Cancelar");
		botonCancelarAlta.setForeground(Color.BLACK);
		botonCancelarAlta.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonCancelarAlta.setBorder(UIManager.getBorder("Button.border"));
		botonCancelarAlta.setBackground(SystemColor.activeCaptionBorder);
		botonCancelarAlta.setBounds(896, 320, 84, 26);
		add(botonCancelarAlta);
		
		JSeparator separator_10 = new JSeparator();
		separator_10.setOrientation(SwingConstants.VERTICAL);
		separator_10.setForeground(Color.LIGHT_GRAY);
		separator_10.setBounds(998, 45, 1, 319);
		add(separator_10);
		
		JButton botonAceptarAlta = new JButton("Aceptar");
		botonAceptarAlta.setForeground(Color.BLACK);
		botonAceptarAlta.setFont(new Font("Tahoma", Font.PLAIN, 12));
		botonAceptarAlta.setBorder(UIManager.getBorder("Button.border"));
		botonAceptarAlta.setBackground(SystemColor.activeCaptionBorder);
		botonAceptarAlta.setBounds(794, 320, 84, 26);
		add(botonAceptarAlta);
		
		JScrollPane scrollPane_2 = new JScrollPane();
		scrollPane_2.setBounds(583, 200, 397, 102);
		add(scrollPane_2);
		
		JTextArea textAreaAlta = new JTextArea();
		scrollPane_2.setViewportView(textAreaAlta);
		
		JLabel label_3 = new JLabel("Observaciones (200 caracteres m\u00E1ximo):");
		label_3.setVerticalAlignment(SwingConstants.TOP);
		label_3.setHorizontalAlignment(SwingConstants.LEFT);
		label_3.setFont(new Font("Tahoma", Font.PLAIN, 12));
		label_3.setBounds(583, 173, 250, 26);
		add(label_3);
		
		JComboBox comboBoxProductoAlta = new JComboBox();
		comboBoxProductoAlta.setBounds(647, 67, 219, 26);
		add(comboBoxProductoAlta);
		
		JSpinner spinnerCantidadAlta = new JSpinner();
		spinnerCantidadAlta.setBounds(647, 99, 107, 26);
		add(spinnerCantidadAlta);
		
		JSeparator separator_11 = new JSeparator();
		separator_11.setOrientation(SwingConstants.VERTICAL);
		separator_11.setForeground(Color.LIGHT_GRAY);
		separator_11.setBounds(565, 45, 1, 319);
		add(separator_11);
		
		JSeparator separator_12 = new JSeparator();
		separator_12.setForeground(Color.LIGHT_GRAY);
		separator_12.setBounds(565, 364, 433, 1);
		add(separator_12);
		
		JLabel lblDarDeAlta = new JLabel("Dar de Alta Stock");
		lblDarDeAlta.setHorizontalAlignment(SwingConstants.CENTER);
		lblDarDeAlta.setFont(new Font("Tahoma", Font.PLAIN, 16));
		lblDarDeAlta.setBounds(607, 35, 154, 21);
		add(lblDarDeAlta);
		
		JSeparator separator_13 = new JSeparator();
		separator_13.setForeground(Color.LIGHT_GRAY);
		separator_13.setBounds(565, 45, 40, 1);
		add(separator_13);
		
		JSeparator separator_14 = new JSeparator();
		separator_14.setForeground(Color.LIGHT_GRAY);
		separator_14.setBounds(765, 45, 233, 1);
		add(separator_14);
		
		JRadioButton radioBotonEnDepositoAlta = new JRadioButton("En Dep\u00F3sito");
		radioBotonEnDepositoAlta.setBounds(871, 100, 109, 23);
		add(radioBotonEnDepositoAlta);
		
		JRadioButton radioBotonEnVentaAlta = new JRadioButton("En Venta");
		radioBotonEnVentaAlta.setBounds(871, 132, 109, 23);
		add(radioBotonEnVentaAlta);
		
		JRadioButton radioBotonEnDepositoBaja = new JRadioButton("En Dep\u00F3sito");
		radioBotonEnDepositoBaja.setBounds(871, 478, 109, 23);
		add(radioBotonEnDepositoBaja);
		
		JRadioButton radioBotonEnVentaBaja = new JRadioButton("En Venta");
		radioBotonEnVentaBaja.setBounds(871, 510, 109, 23);
		add(radioBotonEnVentaBaja);
		tablaStockActual.getColumnModel().getColumn(0).setPreferredWidth(175);
		tablaStockActual.getColumnModel().getColumn(1).setPreferredWidth(60);
		tablaStockActual.getColumnModel().getColumn(2).setPreferredWidth(50);
		tablaStockActual.getColumnModel().getColumn(3).setPreferredWidth(50);
	}
}
